package cn.kgc.crowdfundingadmin2.controller;

import cn.kgc.crowdfundingadmin2.pojo.Admin;
import cn.kgc.crowdfundingadmin2.service.AdminService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;


@Controller
public class AdminController {
    @Resource
    AdminService adminService;

    @RequestMapping("/admin/get_by_id")
    @ResponseBody
    public Admin getByID(Integer id) {
        Admin admin = adminService.selectByPrimaryKey(id);
        return admin;
    }

}
